#pragma once
class MyString
{
	friend ostream &operator<<(ostream &out, MyString &str);
	friend istream &operator<<(istream &in, MyString &str);
public:
	MyString();
	MyString(int n, char c);
	MyString(int n, char *s);
	MyString(const MyString &str);
	// MyString &operator=(const MyString &str);
	~MyString();

	MyString * operator+(const MyString &str);
	MyString * operator+(const char *s);
	MyString & operator+=(const MyString &str);
	MyString & operator+=(const char *c);


	/*
	MyString s1;
	MyString s2;
	MyString s3=s1+s2;
	MyString s4=s3+"hello";
	s4+=s3;
	s4+="hello";
	cout<<s4<<endl;
	cin>>s4;
	*/

private:
	char *pM;
	int mSize;
};

